﻿using System;
using DevExpress.Xpo;
using Zero.POCO;

namespace Zero.DataLayer.Donnees
{
    public class XpoAnnonceur : XPBaseObject
    {


        public XpoAnnonceur()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public XpoAnnonceur(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }


        
        private Guid _Oid;
        [Key]
        public Guid Oid
        {
            get { return _Oid; }
            set { SetPropertyValue("Oid", ref _Oid, value); }
        }

        private string _Name;
        public string Name
        {
            get { return _Name; }
            set { SetPropertyValue("Name", ref _Name, value); }
        }




        private Domaine _Domaine;
        public Domaine Domaine
        {
            get { return _Domaine; }
            set { SetPropertyValue("Domaine", ref _Domaine, value); }
        }


        [Aggregated, Association("XpoCompaign-XpoAnnonceur")]
        public XPCollection<XpoCompaign> Compaigns
        {
            get { return GetCollection<XpoCompaign>("Compaigns"); }
        }

        [Aggregated, Association("XpoMarque-XpoAnnonceur")]
        public XPCollection<XpoMarque> Marques
        {
            get { return GetCollection<XpoMarque>("Marques"); }
        }

    }
}